package com.example.spring2303.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {

//    @Bean
//    public CustomerByAno getCustomerByAno() {
//        CustomerByAno ano = new CustomerByAno();
//        ano.setId(9090);
//        ano.setUsername("admin9090");
//        ano.setPassword("pwd9090");
//        return  ano;
//
//    }
    @Autowired
    CustomerByAno ano;
    public void setInfo() {
        ano.setId(123123);
        ano.setUsername("admin123123");
        ano.setPassword("99999");
    }
    public void getInfo() {
        System.out.println("id =" +ano.getId() + "姓名=" + ano.getUsername() + ";密码=" + ano.getPassword());
    }


}
